/*
 * @Author: zhangweinan
 * @Date: 2023-07-17 14:27:07
 * @LastEditors: zhangweinan
 * @LastEditTime: 2023-08-03 23:12:17
 * @Description: file content
 * @FilePath: \cty-admin\src\main.js
 */
import Vue from "vue";

import "normalize.css/normalize.css"; // A modern alternative to CSS resets

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

import "@/styles/index.scss"; // global css

import App from "./App";
import store from "./store";
import router from "./router";

import "@/icons"; // icon
import "@/permission"; // permission control
import { globalRegister } from "@/global";
import { setupStore } from './store'
import VChart from 'vue-echarts'

import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts

import {
  parseTime,
} from "@/utils/index";
import download from './utils/download';
Vue.prototype.$download = download;
Vue.prototype.parseTime = parseTime;
Vue.prototype.$bus = new Vue();
Vue.component('v-chart', VChart)
if (process.env.NODE_ENV === "production") {
  const { mockXHR } = require("../mock");
  mockXHR();
}
import axios from 'axios'
Vue.prototype.axios = axios

Vue.use(ElementUI);
Vue.use(globalRegister);
Vue.config.productionTip = false;

setupStore()
new Vue({
  el: "#app",
  router,
  store,
  render: (h) => h(App),
});
